
<%@ page import="sige.Contrato" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'contrato.label', default: 'Contrato')}" />
		<title><g:message code="default.list.label" args="[entityName]" /></title>
	</head>
	<body>
		<center>
        	<h1><g:message code="default.list.label" args="[entityName]" /></h1>
        </center>
        <ul class="breadcrumb">
          <li>
            <g:link controller="principal">
              <i class="icon-home"></i>
              <g:message code="default.home.label"/>
            </g:link>
            <span class="divider"><g:message code="span.divider" /></span>
          </li>
        </ul>
        
        <g:if test="${flash.message}">
          <div class="alert alert-info">
            <button type="button" class="close" data-dismiss="alert">&times;</button>
            ${flash.message}
          </div>
        </g:if>
		<div id="list-contrato" class="span12" role="main">
			<div id="table">
                <table class="table table-striped table-hover">
	                <thead>
		                <tr>
		
			                <th><g:message code="contrato.aluno.label" default="Aluno" /></th>
		
			                <th><g:message code="contrato.responsavel.label" default="Responsavel" /></th>
		
			                <th><g:message code="contrato.serie.label" default="Serie" /></th>
		
			                <th><g:message code="contrato.anulacao.label" default="Anulação" /></th>
			
		                    <th><g:message code="contrato.ativo.label" default="Ativo" /></th>
			
		                </tr>
	                </thead>
	                <tbody>
	                <g:each in="${contratoInstanceList}" status="i" var="contratoInstance">
		                <tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
		
			                <td><g:link action="show" id="${contratoInstance.id}">${fieldValue(bean: contratoInstance, field: "aluno")}</g:link></td>
		
			                <td>${fieldValue(bean: contratoInstance?.responsavel, field: "nome")}</td>
		
			                <td>${fieldValue(bean: contratoInstance?.turma?.serie, field: "nome")}</td>
		
			                <td>${fieldValue(bean: contratoInstance, field: "anulacao")}</td>
		
			                <td><g:formatBoolean boolean="${contratoInstance.ativo}" /></td>
		
		                </tr>
	                </g:each>
	                </tbody>
                </table>
            </div>
			<div class="pagination" align="center">
				<g:paginate total="${contratoInstanceTotal}" />
			</div>
		</div>
	</body>
</html>
